import React from 'react';
import '../../css/style.css';
export default class ComponentHeader extends React.Component{

    constructor(){
        super();
        this.state={
            miniHeader:false
        };
    }

    switchHrader(){
        this.setState({
            miniHeader:!this.state.miniHeader
        });
    }

    render(){
        
        const styleComponentHeader={
            header:{
                backgroundColor:"#333333",
                color:"#FFFFFF",
                "padding-top": (this.state.miniHeader) ? "3px" : "15px",
                paddingBottom:(this.state.miniHeader) ? "3px" : "15px"
            },
        };
        return(
            <header  class="miniFooter" onClick={this.switchHrader.bind(this)}>
                <h1>这里是头部</h1>
            </header>
        );
    }
}